<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

?>
<?php
 include("top.php");
?>
<script type="text/javascript">
    function check_input1(form)
    {
        if(form.keyword.value=="") {
            alert("请输入关键字!");
            form.keyword.select();
            return(false);
        }
	return(true);
    }
</script>
<table width="766" height="438" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="229" height="438" valign="top" bgcolor="#FFFFFF"><div align="center">
      <?php include("left.php");?>
	
      </div></td>
    <td width="561" align="center" valign="top" bgcolor="#FFFFFF"><table width="550" height="20" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table>
      <table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
        <form name="form1" method="post" action="findbook.php" onSubmit="return check_input1(this)">
          <tr>
            <td height="25" bgcolor="#B0E0E6"><div align="center">图书高级搜索</div></td>
          </tr>
          <tr>
            <td height="50" bgcolor="#B0E0E6"><table width="400" height="80" border="0" cellpadding="0" cellspacing="1">
                <tr>
                  <td width="80" height="25" bgcolor="#FFFFFF"><div align="center">关键字:</div></td>
                  <td width="207" bgcolor="#FFFFFF"><div align="left">
                      <input name="keyword" type="text" size="20">
                  </div></td>
                  <td width="51" bgcolor="#FFFFFF"><div align="center">模糊:</div></td>
                  <td width="69" bgcolor="#FFFFFF"><div align="center">
                      <input name="vague" type="checkbox" value="1" checked>
                  </div></td>
                </tr>
                <tr>
                  <td height="25" bgcolor="#FFFFFF"><div align="center">价格:</div></td>
                  <td height="25" colspan="3" bgcolor="#FFFFFF"><div align="left">
                      <select name="tag">
                        <option selected value="1">大于</option>
                        <option value="-1">小于</option>
                        <option value="0">等于</option>
                      </select>
                    &nbsp;
                <select name="price">
                  <option selected value=10>10</option>
                  <option value=20>20</option>
                  <option value=50>50</option>
                  <option value=100>100</option>
                </select>
                元</div></td>
                </tr>
                <tr>
                  <td height="25" bgcolor="#FFFFFF"><div align="center">图书类别:</div></td>
                  <td height="25" colspan="3" bgcolor="#FFFFFF"><div align="left">
                      <select name="class">
                        <?php
				 $sql=exectue_sql_statement($conn, "select * from Classification");
				 $info=sqlsrv_fetch_array($sql);
				 if($info==false) {
				     echo " <option>本站暂无商品类别</option>";
				   }
				  else
				  { 
				    do
					 {
				?>
                        <option value=<?php echo $info['classify_id'];?>><?php echo $info['classify_name'];?></option>
                        <?php
				     }while($info=sqlsrv_fetch_array($sql));
				 }
				?>
                      </select>
                  </div></td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td height="25" bgcolor="#FFFFFF"><div align="center">
                <input name="submit2" type="submit" value="开始查找">
            </div></td>
          </tr>
        </form>
    </table></td>
  </tr>
</table>
<?php
 include("bottom.php");
?>